package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @Author:FangZhiyi
 * @Description
 * @Data Created in 2020/7/28 10:40
 * @Moddified By:
 */
@Entity
@Table(name = "fus_base_dictionary", schema = "", catalog = "")
public class FusBaseDictionary implements Serializable {
    private Long dicId;
    private String dicKeyCode;
    private String dicKeyName;
    private String dicKeySpell;
    private String dicValue;
    private String dicValueTitle;
    private String dicValueCode;
    private Integer dicValueSort;
    private Byte dicStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date gmtCreate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date gmtModified;

    @Id
    @Column(name = "dic_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getDicId() {
        return dicId;
    }

    public void setDicId(Long dicId) {
        this.dicId = dicId;
    }

    @Basic
    @Column(name = "dic_key_code")
    public String getDicKeyCode() {
        return dicKeyCode;
    }

    public void setDicKeyCode(String dicKeyCode) {
        this.dicKeyCode = dicKeyCode;
    }

    @Basic
    @Column(name = "dic_key_name")
    public String getDicKeyName() {
        return dicKeyName;
    }

    public void setDicKeyName(String dicKeyName) {
        this.dicKeyName = dicKeyName;
    }

    @Basic
    @Column(name = "dic_key_spell")
    public String getDicKeySpell() {
        return dicKeySpell;
    }

    public void setDicKeySpell(String dicKeySpell) {
        this.dicKeySpell = dicKeySpell;
    }

    @Basic
    @Column(name = "dic_value")
    public String getDicValue() {
        return dicValue;
    }

    public void setDicValue(String dicValue) {
        this.dicValue = dicValue;
    }

    @Basic
    @Column(name = "dic_value_title")
    public String getDicValueTitle() {
        return dicValueTitle;
    }

    public void setDicValueTitle(String dicValueTitle) {
        this.dicValueTitle = dicValueTitle;
    }

    @Basic
    @Column(name = "dic_value_code")
    public String getDicValueCode() {
        return dicValueCode;
    }

    public void setDicValueCode(String dicValueCode) {
        this.dicValueCode = dicValueCode;
    }

    @Basic
    @Column(name = "dic_value_sort")
    public Integer getDicValueSort() {
        return dicValueSort;
    }

    public void setDicValueSort(Integer dicValueSort) {
        this.dicValueSort = dicValueSort;
    }

    @Basic
    @Column(name = "dic_status")
    public Byte getDicStatus() {
        return dicStatus;
    }

    public void setDicStatus(Byte dicStatus) {
        this.dicStatus = dicStatus;
    }

    @Basic
    @Column(name = "gmt_create")
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Basic
    @Column(name = "gmt_modified")
    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FusBaseDictionary that = (FusBaseDictionary) o;
        return dicId.equals(that.dicId) &&
                dicStatus.equals(that.dicStatus) &&
                Objects.equals(dicKeyCode, that.dicKeyCode) &&
                Objects.equals(dicKeyName, that.dicKeyName) &&
                Objects.equals(dicKeySpell, that.dicKeySpell) &&
                Objects.equals(dicValue, that.dicValue) &&
                Objects.equals(dicValueTitle, that.dicValueTitle) &&
                Objects.equals(dicValueCode, that.dicValueCode) &&
                Objects.equals(dicValueSort, that.dicValueSort) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(dicId, dicKeyCode, dicKeyName, dicKeySpell, dicValue, dicValueTitle, dicValueCode, dicValueSort, dicStatus, gmtCreate, gmtModified);
    }
}
